<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        /* class constructor */
        /* Person  name,age
         */
        /* 面向对象 */
        class Person {

            constructor(name, age) {
                this.name = name;
                this.age = age;
                console.log("con:", this)
            }
        }
        var p = new Person("李四", 18);
        console.log(p)
    </script>
</body>

</html>